package top.z.orm.handle.osql.core;

import top.z.orm.core.osql.MapSql;
import top.z.orm.core.osql.MapSqlKey;
import top.z.orm.core.osql.MapSqlSetting;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

public class MapSqlImpl implements MapSql {

    Map<MapSqlKey, String>      sqlkeyMap        = new HashMap<>();
    //	Map<String, Object> whereConditonMap = new HashMap<>();
    Map<String, Object>         whereConditonMap = new LinkedHashMap<>();
    Map<MapSqlSetting, Boolean> settingMap       = new HashMap<>();

    @Override
    public void put(MapSqlKey key, String value) {
        sqlkeyMap.put(key, value);
    }

    @Override
    public void put(String fieldName, Object value) {
        whereConditonMap.put(fieldName, value);
    }

    @Override
    public void put(MapSqlSetting MapSqlSetting, boolean value) {
        settingMap.put(MapSqlSetting, value);
    }

    Map<MapSqlKey, String> getSqlkeyMap() {
        return sqlkeyMap;
    }

    Map<String, Object> getWhereCondtionMap() {
        return whereConditonMap;
    }

    Map<MapSqlSetting, Boolean> getSqlSettingMap() {
        return settingMap;
    }
}
